﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="ReviewList.aspx.vb" Inherits="LondonItalianRestaurants.rest_review_list" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <br />
    </p>
    <p>
        <br />
        <asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="ID" DataSourceID="DetailsDataSource2">
            <Columns>
                <asp:BoundField DataField="RestaurantName" HeaderText="RestaurantName" 
                    SortExpression="RestaurantName" />
                <asp:BoundField DataField="MichelinStars" HeaderText="MichelinStars" 
                    SortExpression="MichelinStars" />
                <asp:ImageField DataImageUrlField="RestaurantPicture" HeaderText="Thumbnail" 
                    SortExpression="Thumbnail">
                    <ControlStyle CssClass="DetailPicture" />
                </asp:ImageField>
                <asp:HyperLinkField DataNavigateUrlFields="PostCode" 
                    DataNavigateUrlFormatString="http://google.co.uk/maps?q={0}" 
                    DataTextField="PostCode" HeaderText="Map" SortExpression="Map" />
                <asp:HyperLinkField DataNavigateUrlFields="Website" 
                    DataNavigateUrlFormatString="{0}" DataTextField="Website" 
                    HeaderText="Website" />
                <asp:HyperLinkField HeaderText="Rate" NavigateUrl="~/Details.aspx" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="DetailsDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
            SelectCommand="SELECT [ID], [RestaurantName], [RestaurantAddress], [PostCode], [PhoneNumber], [Website], [Restaurantmenu], [AveragePrice], [RestaurantPicture], [MichelinStars] FROM [Restaurants] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        &nbsp;</p>
    <p>
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
            DataSourceID="SqlDataSource1">
            <Columns>
                <asp:BoundField DataField="Author" HeaderText="Author" 
                    SortExpression="Author" />
                <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
                <asp:BoundField DataField="CommentBody" HeaderText="CommentBody" 
                    SortExpression="CommentBody" />
                <asp:BoundField DataField="Restaurant_fkid" HeaderText="Restaurant_fkid" 
                    SortExpression="Restaurant_fkid" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
            SelectCommand="SELECT [Author], [Title], [CommentBody], [Restaurant_fkid] FROM [Comments] WHERE ([Restaurant_fkid]  = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        Title:&nbsp;
        <asp:TextBox ID="tb_Title" runat="server" Width="169px"></asp:TextBox>
    </p>
    <p>
        <asp:TextBox ID="tb_CommentBody" runat="server" Height="205px" 
            TextMode="MultiLine" Width="295px"></asp:TextBox>
    </p>
    <p>
        <asp:Button ID="btn_Comment" runat="server" Text="Add Comment" Width="120px" />
    </p>
    <p>
    </p>
    <p>
    </p>
</asp:Content>
